import React, { Component } from 'react';
import { getlist } from '@/api/http';
import { BotLunBoCss } from '../style';
class BotLunbo extends Component {
    state = {
        list: []
    }
    componentDidMount() {
        // 获取tab 数据
        getlist('wap').then(r => {
            this.setState({
                list: r.data.data
            })
        })
    }
   
    render() {
        return (
            <BotLunBoCss>
                {
                    this.state.list.length > 0
                        ?
                        this.state.list.map(r => (
                            <div className='box' key={r.id}>
                                <div className='pic_box'>
                                    <img src={r.icon} alt="" />
                                </div>
                                <p>{r.name}</p>
                            </div>
                        ))
                        :
                        <div>
                            等等....
                        </div>
                }
            </BotLunBoCss>
        );
    }
}

export default BotLunbo;
